var Cesium = require('cesium/Cesium');
require('cesium/Widgets/widgets.css');
require('./css/main.css')
var viewer = new Cesium.Viewer('cesiumContainer',{
    infoBox : false,
    // imageryProvider :new Cesium.WebMapServiceImageryProvider({
    //     url:'http://192.168.7.255:9090/iserver/services/3D-BSLZ/rest/realspace'
    // })
    // terrainProvider:new Cesium.CesiumTerrainProvider({
    //     url:'http://www.supermapol.com/realspace/services/3D-ZF_normal/rest/realspace/datas/srtm_54_07@zhufeng',
    //     isSct : true
    // })
});
viewer.scene.shadows=true;
// var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
//     url: 'http://192.168.7.255:9090/iserver/services/3D-BSLZ/rest/realspace/scenes/BSScene.json',
//     //maximumScreenSpaceError: 2,
//     //maximumNumberOfLoadedTiles: 100,
// }));
// const scene = viewer.scene;
const globe = viewer.scene.globe;
// scene.camera.flyTo(103.7864, 36.0752)
// scene.open('http://192.168.7.255:9090/iserver/services/3D-BSLZ/rest/realspace');
// try {
//     const promise = scene.open('http://192.168.7.255:9090/iserver/services/3D-BSLZ/rest/realspace');
//     //打开所发布三维服务下的所有图层
//     Cesium.when(promise, function (layer) {
//         scene.camera.flyto(103.7864, 36.0752);
//     });
// } catch (e) {
//     if (widget._showRenderLoopErrors) {
//         var title = '渲染时发生错误，已停止渲染。';
//         widget.showErrorPanel(title, undefined, e);
//     }
// }